# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-zope-annotation
pkgver=5.0
pkgrel=2
pkgdesc="Object annotation mechanism"
arch=('any')
url="https://github.com/zopefoundation/zope.annotation"
license=('ZPL')
depends=('python-setuptools' 'python-zope-interface' 'python-zope-component'
         'python-zope-location' 'python-zope-proxy')
checkdepends=('python-zope-configuration' 'python-zope-testing' 'python-zope-testrunner')
source=("$pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/zope.annotation/archive/$pkgver.tar.gz")
sha512sums=('4d616e611b6563e405cfeffcaa602bd0d5065618053a8f5f3c41a5cd1d884bbdc6c74dc705be5c6210d6e6b012a30c48b3a5523952b6ad0c5db96db117074df3')

build() {
  cd zope.annotation-$pkgver
  python setup.py build
}

check() {
  cd zope.annotation-$pkgver
  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python -m zope.testrunner --test-path=src
}

package() {
  cd zope.annotation-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
